<!--#Include File="Include.asp"--><%
'--------------------------------------
'Power By 方卡在线 @2010-2014 f02
'URL:http://www.fangka.net/
'EMail:admin@ifangka.com
'QQ:861118936
'版权所有 未经允许不得去除本版权信息
'--------------------------------------

Call CheckAdminType("0,1",UType)

Types=Clng(Request.QueryString("Type"))

Select Case Types
	Case 1
		Call GetUserInfo() '读取管理用户信息
	Case 2
		Call GetTopNav() '读取顶部菜单
	Case 3
		Call GetLeftNav() '读取左侧菜单
	Case 4
		Call GetMain() '读取管理首页信息
	Case 5
		Call GetAbout() '读取系统版权
	Case 6
		Call GetMenuNav() '读取内容设置左侧菜单
	Case 7
		Call GetModuleNav() '读取菜单项左侧菜单
	Case 8
		Call GetContact () '读取联系方式
	Case Else
		Call FKFun.ShowErr("未发现功能项！",1)
End Select

'==========================================
'函 数 名：GetUserInfo()
'作	用：读取管理用户信息
'==========================================
Sub GetUserInfo()
	Temp=LCase(FKFun.GetAdminDir())
%>
您的帐号是：&nbsp;&nbsp;<%=ULogin%>[<%=UName%>]&nbsp;&nbsp;您的权限是：&nbsp;&nbsp;<%=UTypeName%>&nbsp;&nbsp;[ <a href="../" target="_blank" title="前台首页" class="blue_a">前台首页</a> <a href="PassWord.asp?Type=1" target="dialog" width="300" title="修改密码" class="blue_a">修改密码</a> <a href="Logout.asp" title="退出登录" class="blue_a">退出登录</a> ]
<%
	If Temp="admin" Then
%>
<div id="dirError">系统检测到您的管理目录名是默认的 Admin ，建议修改为其他名称！  <a href="javascript:void(0);" onclick="$('#dirError').hide();">×</a></div>
<%
	End If
End Sub

'==========================================
'函 数 名：GetTopNav()
'作	用：读取顶部菜单
'==========================================
Sub GetTopNav()
	Dim IsTop
	IsTop=" nav1"
%>
			<ul>
<%
	If Instr(ULimit,"s_")>0 Or ULimit="all" Then
%>
				<li class="bignav<%=IsTop%>" onclick="$('.bignav').removeClass('nav1');$(this).addClass('nav1');ajax_get('mainLeft','Get.asp?Type=3');">管理首页</li>
<%
		IsTop=""
	End If
	If Instr(ULimit,"m_")>0 Or Instr(ULimit,"o_")>0 Or ULimit="all" Then
%>
				<li class="bignav<%=IsTop%>" onclick="$('.bignav').removeClass('nav1');$(this).addClass('nav1');ajax_get('mainLeft','Get.asp?Type=6');">内容设置</li>
<%
		IsTop=""
	End If
	Sqlstr="Select Fk_Menu_Id,Fk_Menu_Name From [Fk_Menu]"
	If UShowMenu<>"all" Then
		Sqlstr=Sqlstr&" Where Fk_Menu_Id In (0"&UShowMenu&"0)"
	End If
	Sqlstr=Sqlstr&" Order By Fk_Menu_Id Asc"
	Rs.Open Sqlstr,Conn,1,1
	If Not Rs.Eof Then
		i=1
		While Not Rs.Eof
%>
				<li class="bignav<%=IsTop%>" onclick="$('.bignav').removeClass('nav1');$(this).addClass('nav1');ajax_get('mainLeft','Get.asp?Type=7&Menu=<%=Rs("Fk_Menu_Id")%>');"><%=Rs("Fk_Menu_Name")%></li>
<%
				IsTop=""
			Rs.MoveNext
			i=i+1
		Wend
	End If
	Rs.Close
%>
</ul>
			<div class="cal"></div>
<%
End Sub

'==========================================
'函 数 名：GetLeftNav()
'作	用：读取左侧菜单
'==========================================
Sub GetLeftNav()
	Call NavTop()
	If Instr(ULimit,"s_")>0 Or ULimit="all" Then
%>
		<div id="menu">
			<div class="menuTitle">常规管理</div>
			<ul>
				<%If CheckAdminLimit(ULimit,"s_System",1) Then%>
				<li><a href="SiteSet.asp?Type=1" target="dialog" width="900"><span>&nbsp;&nbsp;&nbsp;</span>站点设置</a></li><%End If%>
				<%If UType=0 Then%>
				<li><a href="Admin.asp?Type=1" target="get" div="mainRight"><span>&nbsp;&nbsp;&nbsp;</span>管理员管理</a></li><%End If%>
				<%If CheckAdminLimit(ULimit,"s_Html",1) And Fk_Site_Html=2 Then%>
				<li><a href="Html.asp?Type=1" target="dialog" width="900"><span>&nbsp;&nbsp;&nbsp;</span>静态页面生成</a></li><%End If%>
				<%If CheckAdminLimit(ULimit,"s_Rewrite",1) And Fk_Site_Html=3 Then%>
				<li><a href="Rewrite.asp?Type=1" target="dialog" width="900"><span>&nbsp;&nbsp;&nbsp;</span>伪静态规则生成</a></li><%End If%>
				<%If CheckAdminLimit(ULimit,"s_Template",1) Then%>
					<%If Instr(Fk_Site_HideLink_Str,",hide_Template,")=0 Then%>
				<li><a href="Template.asp?Type=1" target="get" div="mainRight"><span>&nbsp;&nbsp;&nbsp;</span>模板管理</a></li><%End If%>
					<%If Instr(Fk_Site_HideLink_Str,",hide_LabelBuilder,")=0 Then%>
				<li><a href="LabelBuilder.asp?Type=1" target="dialog" width="900"><span>&nbsp;&nbsp;&nbsp;</span>模板标签生成器</a></li><%End If%>
				<%End If%>
				<%If CheckAdminLimit(ULimit,"s_AspJpeg",1) And Instr(Fk_Site_HideLink_Str,",hide_AspJpeg,")=0 Then%>
				<li><a href="AspJpeg.asp?Type=1" target="dialog" width="800"><span>&nbsp;&nbsp;&nbsp;</span>图片水印缩略设置</a></li><%End If%>
				<%If CheckAdminLimit(ULimit,"s_JMail",1) And Instr(Fk_Site_HideLink_Str,",hide_JMail,")=0 Then%>
				<li><a href="JMail.asp?Type=1" target="dialog" width="800"><span>&nbsp;&nbsp;&nbsp;</span>邮件发送设置</a></li><%End If%>
				<%If CheckAdminLimit(ULimit,"s_SiteMap",1) And Instr(Fk_Site_HideLink_Str,",hide_SiteMap,")=0 Then%>
				<li><a href="SiteMap.asp?Type=1" target="dialog" width="600"><span>&nbsp;&nbsp;&nbsp;</span>生成网站地图</a></li><%End If%>
			</ul>
		</div>
<%
	End If
End Sub

'==========================================
'函 数 名：GetMain()
'作	用：读取管理首页信息
'==========================================
Sub GetMain()
%>
	<div id="rightLine">欢迎使用<%=SystemName%>！</div>
<%
End Sub

'==========================================
'函 数 名：GetAbout()
'作	用：读取系统版权
'==========================================
Sub GetAbout()
%>
<div id="title">关于本系统</div>
<div id="box">
	<div class="aboutBox">
		<p><%=SystemName%></p>
		<p>技术联系QQ：14177079</p>
	</div>
</div>
<div id="bottom">
		<input type="button" onclick="dialogClose();" class="button" name="button" id="button" value="关 闭" />
</div>
<%
End Sub

'==========================================
'函 数 名：GetMenuNav()
'作	用：读取内容设置左侧菜单
'==========================================
Sub GetMenuNav()
	Call NavTop()
%>
		<div id="menu">
<%
	If Instr(ULimit,"m_")>0 Or ULimit="all" Then
%>
			<div class="menuTitle">菜单管理</div>
			<ul>
				<%If CheckAdminLimit(ULimit,"m_Menu",1) And Instr(Fk_Site_HideLink_Str,",hide_Menu,")=0 Then%>
				<li><a href="Menu.asp?Type=1" target="get" div="mainRight"><span>&nbsp;&nbsp;&nbsp;</span>菜单管理</a></li><%End If%>
<%
		If CheckAdminLimit(ULimit,"m_Module",1) Then
			Sqlstr="Select Fk_Menu_Id,Fk_Menu_Name From [Fk_Menu] Order By Fk_Menu_Id Asc"
			Rs.Open Sqlstr,Conn,1,1
			If Not Rs.Eof Then
				While Not Rs.Eof
%>
				<li><a href="Module.asp?Type=1&Menu=<%=Rs("Fk_Menu_Id")%>" target="get" div="mainRight"><span>&nbsp;&nbsp;&nbsp;</span><%=Rs("Fk_Menu_Name")%></a></li>
<%
					Rs.MoveNext
				Wend
			End If
			Rs.Close
		End If
%>
			</ul>
<%
	End If
	If Instr(ULimit,"o_")>0 Or ULimit="all" Then
%>
			<div class="menuTitle">其他管理</div>
			<ul>
				<%If CheckAdminLimit(ULimit,"o_Info",1) And Instr(Fk_Site_HideLink_Str,",hide_Info,")=0 Then%>
				<li><a href="Info.asp?Type=1" target="get" div="mainRight"><span>&nbsp;&nbsp;&nbsp;</span>独立信息管理</a></li><%End If%>
				<%If CheckAdminLimit(ULimit,"o_Friends",1) Then%>
					<%If Instr(Fk_Site_HideLink_Str,",hide_Friends,")=0 Then%>
				<li><a href="Friends.asp?Type=1" target="get" div="mainRight"><span>&nbsp;&nbsp;&nbsp;</span>友情链接管理</a></li><%End If%>
					<%If Instr(Fk_Site_HideLink_Str,",hide_FriendsType,")=0 Then%>
				<li><a href="FriendsType.asp?Type=1" target="get" div="mainRight"><span>&nbsp;&nbsp;&nbsp;</span>友情链接类型管理</a></li><%End If%>
				<%End If%>
				<%If CheckAdminLimit(ULimit,"o_Vote",1) And Instr(Fk_Site_HideLink_Str,",hide_Vote,")=0 Then%>
				<li><a href="Vote.asp?Type=1" target="get" div="mainRight"><span>&nbsp;&nbsp;&nbsp;</span>投票管理</a></li><%End If%>
				<%If CheckAdminLimit(ULimit,"o_Focus",1) And Instr(Fk_Site_HideLink_Str,",hide_Focus,")=0 Then%>
				<li><a href="Focus.asp?Type=1" target="get" div="mainRight"><span>&nbsp;&nbsp;&nbsp;</span>独立轮换管理</a></li><%End If%>
				<%If CheckAdminLimit(ULimit,"o_Subject",1) And Instr(Fk_Site_HideLink_Str,",hide_Subject,")=0 Then%>
				<li><a href="Subject.asp?Type=1" target="get" div="mainRight"><span>&nbsp;&nbsp;&nbsp;</span>专题管理</a></li><%End If%>
				<%If CheckAdminLimit(ULimit,"o_Recommend",1) And Instr(Fk_Site_HideLink_Str,",hide_Recommend,")=0 Then%>
				<li><a href="Recommend.asp?Type=1" target="get" div="mainRight"><span>&nbsp;&nbsp;&nbsp;</span>推荐类型管理</a></li><%End If%>
				<%If CheckAdminLimit(ULimit,"o_Word",1) And Instr(Fk_Site_HideLink_Str,",hide_Word,")=0 Then%>
				<li><a href="Word.asp?Type=1" target="get" div="mainRight"><span>&nbsp;&nbsp;&nbsp;</span>站内关键字管理</a></li><%End If%>
				<%If CheckAdminLimit(ULimit,"o_Model",1) And Instr(Fk_Site_HideLink_Str,",hide_Model,")=0 Then%>
				<li><a href="Model.asp?Type=1" target="get" div="mainRight"><span>&nbsp;&nbsp;&nbsp;</span>模型管理</a></li><%End If%>
				<%If CheckAdminLimit(ULimit,"o_Field",1) And Instr(Fk_Site_HideLink_Str,",hide_Field,")=0 Then%>
				<li><a href="Field.asp?Type=1" target="get" div="mainRight"><span>&nbsp;&nbsp;&nbsp;</span>自定义字段管理</a></li><%End If%>
				<!--QQ-->
				<li><a href="QQ.asp?Type=1" target="get" div="mainRight"><span>&nbsp;&nbsp;&nbsp;</span>QQ客服管理</a></li>
				<!--QQ-->
			</ul>
		</div>
<%
	End If
End Sub

'==========================================
'函 数 名：GetModuleNav()
'作	用：读取菜单项左侧菜单
'==========================================
Sub GetModuleNav()
	MenuId=Clng(Request.QueryString("Menu"))
	Call NavTop()
%>
		<div id="menu">
<%
	Sqlstr="Select Fk_Module_Id,Fk_Module_Name,Fk_Module_Type From [Fk_Module] Where Fk_Module_State=1 And Fk_Module_Menu="&MenuId&" And Fk_Module_Level=0"
	If UShowModule<>"all" Then
		Sqlstr=Sqlstr&" And Fk_Module_Id In (0"&UShowModule&"0)"
	End If
	Sqlstr=Sqlstr&" Order By Fk_Module_Order Asc,Fk_Module_Id Asc"
	Rs.Open Sqlstr,Conn,1,1
	If Not Rs.Eof Then
		While Not Rs.Eof
			Temp=Rs("Fk_Module_Name")
			If CheckAdminLimit(ULimit,"v_"&Rs("Fk_Module_Id"),1) Then
				Select Case Rs("Fk_Module_Type")
					Case 1
						Temp="<a href='View.asp?Type=1&Menu="&MenuId&"&Module="&Rs("Fk_Module_Id")&"' target='get' div='mainRight'>"&Temp&"</a>"
					Case 2
						Temp="<a href='ModuleInfo.asp?Type=1&Menu="&MenuId&"&Module="&Rs("Fk_Module_Id")&"' target='dialog' width='900'>"&Temp&"</a>"
					Case 3
						Temp="<a href='GBook.asp?Type=1&Menu="&MenuId&"&Module="&Rs("Fk_Module_Id")&"' target='get' div='mainRight'>"&Temp&"</a>"
				End Select
			End If
%>
			<div class="menuTitle"><%=Temp%></div>
<%
			Call GetModuleLevelNav(Rs("Fk_Module_Id"),3)
			Rs.MoveNext
		Wend
	End If
	Rs.Close
%>
		</div>
<%
End Sub

'==========================================
'函 数 名：GetModuleLevelNav()
'作	用：读取菜单项左侧多级菜单
'==========================================
Sub GetModuleLevelNav(gId,gNum)
	Dim Rst,gTitle
	Set Rst=Server.Createobject("Adodb.RecordSet")
	Sqlstr="Select Fk_Module_Id,Fk_Module_Name,Fk_Module_Type From [Fk_Module] Where Fk_Module_State=1 And Fk_Module_Menu="&MenuId&" And Fk_Module_Level="&gId&""
	If UShowModule<>"all" Then
		Sqlstr=Sqlstr&" And Fk_Module_Id In (0"&UShowModule&"0)"
	End If
	Sqlstr=Sqlstr&" Order By Fk_Module_Order Asc,Fk_Module_Id Asc"
	Rst.Open Sqlstr,Conn,1,1
	If Not Rst.Eof Then
		Response.Write("<ul>"&vbCrLf)
		Select Case gNum
			Case 1
				gTitle="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;├"
			Case 2
				gTitle="&nbsp;&nbsp;&nbsp;├"
			Case 3
				gTitle="<span>&nbsp;&nbsp;&nbsp;</span>"
		End Select
		While Not Rst.Eof
			Temp=Rst("Fk_Module_Name")
			If UShowModule="all" Then
				ULimit="all"
			End If
			If CheckAdminLimit(ULimit,"v_"&Rst("Fk_Module_Id"),1) Then
				Select Case Rst("Fk_Module_Type")
					Case 1
						Temp="<a href='View.asp?Type=1&Menu="&MenuId&"&Module="&Rst("Fk_Module_Id")&"' target='get' div='mainRight'>"&gTitle&Temp&"</a>"
					Case 2
						Temp="<a href='ModuleInfo.asp?Type=1&Menu="&MenuId&"&Module="&Rst("Fk_Module_Id")&"' target='dialog' width='900'>"&gTitle&Temp&"</a>"
					Case 3
						Temp="<a href='GBook.asp?Type=1&Menu="&MenuId&"&Module="&Rst("Fk_Module_Id")&"' target='get' div='mainRight'>"&gTitle&Temp&"</a>"
					Case Else
						Temp=""&gTitle&Temp&""
				End Select
			Else
				Temp=""&gTitle&Temp&""
			ENd If
%>
				<li><%=Temp%><%If gNum>1 Then%><%Call GetModuleLevelNav(Rst("Fk_Module_Id"),(gNum-1))%><%End If%></li>
<%
			Rst.MoveNext
		Wend
		Response.Write("</ul>"&vbCrLf)
	End If
	Rst.Close
End Sub

'==========================================
'函 数 名：GetContact()
'作	用：读取联系方式
'==========================================
Sub GetContact()
%>
<div id="title">反馈</div>
<div id="box">
	<table width="90%" border="1" bordercolor="#CCCCCC" align="center" cellpadding="0" cellspacing="0">
		<!--<tr>
			<td height="30" align="right">贵州万企联盟：</td>
			<td>&nbsp;<a href="http://www.gzwqlm.com/" target="_blank">http://www.gzwqlm.com/</a></td>
		</tr>
		<tr>
			<td height="30" align="right">贵州商情网：</td>
			<td>&nbsp;<a href="http://www.gzsqw.cn/" target="_blank">http://www.gzsqw.cn/</a></td>
		</tr>-->
		<tr>
			<td height="30" align="right">QQ：</td>
			<td>&nbsp;14177079</td>
		</tr>
		<tr>
			<td height="30" align="right">邮箱：</td>
			<td>&nbsp;14177079@qq.com</td>
		</tr>
	</table>
</div>
<div id="bottom">
		<input type="button" onclick="dialogClose();" class="button" name="button" id="button" value="关 闭" />
</div>
<%
End Sub

'==========================================
'函 数 名：NavTop()
'作	用：关于和反馈链接
'==========================================
Sub NavTop()
%>
		<div id="leftNav">
			<a href="Get.asp?Type=5" id="a1" target="dialog" width="350"></a>
			<a href="Get.asp?Type=8" id="a2" target="dialog" width="350"></a>
		</div>
<%
End Sub

Call FKFun.PageEnd()
%>
